package main

import (
	"image/color"

	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/canvas"
	"fyne.io/fyne/v2/container"
	themex "github.com/zhaocy/fyne-theme"
)

func main() {
	myApp := app.New()
	myApp.Settings().SetTheme(themex.Themex())
	myWin := myApp.NewWindow("rectangle")

	r := canvas.NewRectangle(color.RGBA{0, 69, 236, 100})
	// 边框颜色
	r.StrokeColor = color.RGBA{255, 114, 154, 100}
	// 边框宽度
	r.StrokeWidth = 2
	// 矩形尺寸
	r.Resize(fyne.NewSize(50, 50))
	// 移动到指定坐标位置
	r.Move(fyne.NewPos(50, 50))

	//注意这里不要使用布局
	myWin.SetContent(container.NewWithoutLayout(r))
	myWin.Resize(fyne.NewSize(550, 450))
	myWin.ShowAndRun()
}
